1. Field
The disclosed embodiments relate generally to computer systems, and more particularly to memory management units for input/output (I/O) devices.
2. Background Art
Computer systems of various types are ubiquitous in modern society, including personal computers (PCs), workstations, servers, various personal digital assistant (PDA) devices, etc. Most, if not all, of these computer systems have implemented memory management functionality for access by a processor to memory. Generally, the memory management functionality has included translating addresses from a virtual address space used by each process to a physical address space that spans the actual system memory. Included with the memory management functionality are various memory protections (e.g., read only, read/write, privilege level requirements, etc.). The memory management functionality has a variety of uses, such as protecting the memory used by each process from unauthorized access by other processes, permitting large virtual spaces to be used by processes even if the physical memory system is not that large, relocation of virtual addresses to available physical memory without the participation of the process, and the like.
Like processor addresses that are frequently translated, addresses used by input/output (I/O) devices in computer systems can also be translated. That is, the I/O devices can use virtual addresses rather than physical addresses to access the memory needed to fulfill its operational requirements. Use of virtual addresses rather than physical addresses by devices is preferred in current day systems since it improves the overall security of the system. Use of physical addresses by a malfunctioning device (or a device programmed by a malicious software agent) would result in improper memory access, with potentially catastrophic consequences.
In single operating system (OS) computer systems, such as most PCs, the OS controls access to the I/O devices by other processes (applications and OS services). Accordingly, the OS can control which process has access to a given device at any given point in time, and can at least somewhat control the addresses accessed by the device. Virtual machine systems are more complex, as they may have multiple guest OSs running on a virtual machine monitor. In a virtualized system, many applications and I/O devices access physical memory through the use of virtual addresses. In such a virtualized system, an I/O memory management unit (IOMMU) is coupled to the I/O devices and the system memory. Here, the IOMMU is configured to translate the virtual address in the device memory request to physical addresses so that the device can access the physical system memory.
Performance indicators of an IOMMU include its efficiency of memory access, as well as its ability to perform in a variety of both normal as well as abnormal settings. Efficiency of memory access can be improved through the use of cache, a small, fast memory separate from the main memory that is used to hold recently accessed data.